﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EntreeServer.Module;
using Newtonsoft.Json;

namespace ME.SDK.SampleTheme.Controls
{
    public class  CommentListItem : EntreeListItem
    {
        #region constructor
        protected CommentListItem(EntreeListGroup p)
            : base(p)
        {
            //set ListItemStyle to list style name specified in ListStyles.xml
            this.m_listItemStyle = "version-comment";
        }
        #endregion

        #region public properties
        [JsonIgnore]
        public string Text
        {
            get
            {
                return this.Properties.ContainsKey("Text") ? this.Properties["Text"] : string.Empty;
            }
            set
            {
                this.Properties["Text"] = value;
            }
        }

        [JsonIgnore]
        public string Author
        {
            get
            {
                return this.Properties.ContainsKey("Author") ? this.Properties["Author"] : string.Empty;
            }
            set
            {
                this.Properties["Author"] = value;
            }
        }

        [JsonIgnore]
        public string Date
        {
            get
            {
                return this.Properties.ContainsKey("Date") ? this.Properties["Date"] : string.Empty;
            }
            set
            {
                this.Properties["Date"] = value;
            }
        }
        #endregion
    }
}
